//package com.yuxi.zk;
//
//import org.apache.curator.framework.api.GetChildrenBuilder;
//
//import java.util.List;
//
///**
// * Created by yuxi on 16/11/20.
// */
//public class TestCurrentZk {
//    public static void main(String[] args) throws Exception {
//
////        DistributedLock clientTest = new DistributedLock(
////                "localhost:2181", "locknametest");
////        List<String> subNodes = clientTest.client.getChildren().forPath("/locks");
////        for (String subNode : subNodes) {
////            clientTest.client.delete().forPath("/locks/"+subNode);
////            System.out.println(subNode);
////        }
////        clientTest.client.delete().forPath("/locks");
//
//        Thread threads[] = new Thread[10];
//        for (int i = 0; i < threads.length; i++) {
//            threads[i] = new Thread(new Runnable() {
//                public void run() {
//                    DistributedLock clientTest = new DistributedLock(
//                            "localhost:2181", "locknametest");
//                    clientTest.getLocks();
//                }
//            });
//
//            threads[i].start();
//
//        }
//        Thread.sleep(Integer.MAX_VALUE);
//    }
//}
